<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        $this->_helper->layout->setLayout('default/layout');

    }
    public function indexAction()
    {

    }

    public function createAction(){
        $params['type'] = 2;
        $params['parentID'] = 30;
        $city = Business_Location::get($params);
        $this->view->assign('cities',$city);
        $posts = $this->_request->getPost();
        if($posts){

            var_dump(Model_Customer::create($posts));
        }
    }

    public function getwardAction(){
        $posts = $this->_request->getPost();
        $cityId = $posts['city'];
        $params['type']=3;
        $params['parentID'] = $cityId;
        $wards = Business_Location::get($params);
        $this->_helper->json($wards);

    }

}

